IMotion.SetGroupPathCamSwitch 方法
使用軸組的移動距離來控制用來觸發數位輸出的開關。當軸組移動一定的距離後,開關即開啟或關閉,開關可透過軸組的向前或向後移動來控制。
命名空間:IntervalZero.KINGSTAR.Base.Api組合: IntervalZero.KINGSTAR.Base.Api (於 IntervalZero.KINGSTAR.Base.dll) 版本:4.4.0.0
語法
KsCommandStatus SetGroupPathCamSwitch(
int Index,
KsCommandStatus MotionCommand,
int SwitchLength,
McCamSwitch[] Switches,
int TrackLength,
McOutput[] Outputs,
McTrack[] Tracks,
uint EnableMask
)
Function SetGroupPathCamSwitch(
Index As Integer,
MotionCommand As KsCommandStatus,
SwitchLength As Integer,
Switches As McCamSwitch(),
TrackLength As Integer,
Outputs As McOutput(),
Tracks As McTrack(),
EnableMask As UInteger,
) As KsCommandStatus
參數
Index [in]
型別:int
軸組的索引。索引以 0 為起始。
MotionCommand [in]
凸輪開關附加的軸組路徑運動命令的命令狀態。
SwitchLength [in]
型別:int
開關陣列中的開關數量,每一軌道最多可有八個開關,SwitchLength 範圍為 0 至 24。
Switches [in]
型別:McCamSwitch[]
控制切換動作。軌道編號需要按順序排列。
TrackLength [in]
型別:int
軌道陣列中的軌道數量,輸出與軌道的長度必須一致。例如,有兩個輸出就必須有兩個軌道,TrackLength 的範圍為 1 至 3。
Outputs [in]
型別:McOutput[]
選擇對應軌道所控制的數位輸出。
Tracks [in]
型別:McTrack[]
將補償時間和遲滯加到軌道上的開關,TrackNumber
在 Switches 中定義。
EnableMask [in]
型別:int
啟用不同軌道。此參數為 32 位元的 bool,當 bool 值設為 1 時將啟用軌道陣列中的相應軌道。
回傳值
回傳 KsCommandStatus 類別。
備註
- 與 Motion.SetAxisCamSwitch 運作方式相同。
- 每個軸組運動命令只能附加到一組凸輪開關(最多 24 個開關)。
- 一個軸組最多可有三個路徑凸輪開關。
- 一組路徑凸輪開關最多可有三個軌道。
- 軸組路徑凸輪開關可用於以下函式:
範例
N/A
參見